import os
import sys

from PyQt6.QtCore import QSize, Qt, pyqtSignal
from PyQt6.QtGui import QPixmap
from PyQt6.QtWidgets import QApplication, QDialog, QVBoxLayout, QLabel, QPushButton, QDialogButtonBox, QWidget, \
    QHBoxLayout


class BaseDialog(QDialog, ):
    clicked = pyqtSignal()

    def __init__(self, callback):
        super().__init__()
        self.callback = callback

        self.clicked.connect(self.get_result)


    def get_result(self):
        return self.exec() == QDialog.DialogCode.Accepted  # 返回True表示用户点击了Yes

